package test10;

public class ElectricityChargeofRain extends ElectricityCharge{
    public ElectricityChargeofRain(double kilowatt){
        super(kilowatt);

    }

    @Override
    public double getKil() {
        if(kilowatt<=200){
            return kilowatt*2.25;
        }else {
            return (kilowatt-200)*2.25*0.9+450;
        }
    }

    @Override
    public void showKlowatt() {
        super.showKlowatt();
        System.out.println("这个月处于丰水期，每度为2.25元，如用电量超200度，则超出部分打9折，所以本月的电费是： "+getKil());
        System.out.println();
    }
}
